<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/include/includeHeader.jsp"%>
<%@ include file="/common/include/dictNames.jsp"%>
<%@ page import="com.kylin.module.shop.orm.*,
                 com.kylin.common.util.*,
				 com.kylin.common.dict.orm.Dict,
                 com.kylin.common.paginate.DisplayPage,
			     com.kylin.module.user.orm.*" %>

<table class="tl05" align="center" cellpadding="0" cellspacing="0">
	<tr>
		<td class="prod" valign="top" memo="------列表所在格-------">

			<table class="navi" width="100%" cellspacing="0" cellpadding="0">
				<tr>
					<td>
						| <bean:message key="leads.01"/> 
					<%
					    //String searchType = request.getParameter("searchType");
						StringBuffer titleLinks = new StringBuffer("| ");
						//if(searchType != null && Content.TYPE_BUY.equals(new Short(searchType)) )
						//	titleLinks.append("收购信息 | ");
						//else if(searchType != null && Content.TYPE_SELL.equals(new Short(searchType)) )
						//	titleLinks.append("出售信息 | ");
							
						if (request.getAttribute("searchCatProduct") != null) {
							Dict cat = (Dict) request.getAttribute("searchCatProduct");
							if (cat.getParent() != null) {
								titleLinks.append("<a href=") 
								 .append("'CMD=contentList&searchType=")
								 .append(request.getParameter("searchType"))
								 .append("&parentCat=").append(cat.getParent().getId())
								 .append("'>").append(cat.getParent().getName())
								 .append("</a> | ");
							}
							titleLinks.append(cat.getName());
						}
						out.println(titleLinks);
					%>
					</td>
				</tr>
			</table>
<mytag:MyActionMsg />
<div style="text-align:center"><script type="text/javascript"><!--
google_ad_client = "pub-6007578250513537";
/* 468x60, 创建于 08-5-13 */
google_ad_slot = "5206242207";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>

			<table class="prodt02" cellspacing="0" cellpadding="0">
				<tr>
					<td class="tl05pl"></td>
					<td class="tl05pm">
						<table width="100%" cellspacing="0" cellpadding="0">
							<tr>
								<td width="90" align="center">
									<bean:message key="base.16" />
								</td>
								<td align="center">
									<bean:message key="base.23" />
								</td>
							</tr>
						</table>
					</td>
					<td class="tl05pr"></td>
				</tr>
			</table>
			<table class="prodt03" cellspacing="0" cellpadding="0">
				<tr>
					<td></td>
				</tr>
			</table>

	<table class="prodt01" cellspacing="0" cellpadding="0" memo="贸易信息列表">

<%
	DisplayPage dispage = null;
  if(request.getAttribute(Constants.KEY_REQUEST_RESULT )instanceof DisplayPage){
     dispage = (DisplayPage)request.getAttribute(Constants.KEY_REQUEST_RESULT);
     out.println("<input type='hidden' name='searchId' value='"+dispage.getSearchId()+"' />");
     out.println("<input type='hidden' name='page' value='"+dispage.getPageNumber()+"' />");

     for(int i=0;i<dispage.getList().size();i++){
    	Content obj = (Content)dispage.getList().get(i);
%>
   <tr class="<%=(i%2==0)?"seller02":"seller03" %>">
     <td class="sellerm">
         <img src="/images/flag/<%=obj.getCountry()%>.jpg" width="18" height="12" title="<bean:message key="trade.listflag" />">
     </td>
     <td class="sellerr">
         <% 
         	if(Content.TYPE_BUY.equals(obj.getType())){%>
         		<bean:message key="company.49" />
         		<%} %>
         <%if(Content.TYPE_SELL.equals(obj.getType())){%>
         		<bean:message key="company.48" />
         		<%} %>
     </td>
     <td class="sellerr"><p>
        <img src="/images/arrowy.gif" width="11" height="11" align="absmiddle"> 
        <a href="/module/shop/shop.do?CMD=contentDetail&searchType=<%=obj.getType()%>&id=<%=obj.getId() %>" target="_blank" class="pron">
            <%=obj.getTitle() %>
        </a><br> &nbsp;&nbsp;&nbsp;&nbsp;<bean:message key="base.12" />
  		<a href="/module/shop/shop.do?CMD=contentList&searchType=<%=obj.getType()%>&country=<%=obj.getCountry()%>" class="proo">
  			<%=UTool.getCountryName(obj.getCountry(),sessionLocale)%>
  	    </a>&nbsp;&nbsp;&nbsp;&nbsp;<bean:message key="company.31" />
        <a href="/module/shop/shop.do?CMD=contentList&searchType=<%=obj.getType()%>&catid=<%=(obj.getCatproduct()!=null)?obj.getCatproduct().getId()+"":"0" %>" class="proo">
             <%=JspHelper.checkNull(obj.getCatproduct()) %>
        </a>
         <bean:message key="leads.03" /><%=obj.getCreatedon() %></p>
          </td>
      </tr>
<%
      }
  }
%>
    </table>
<%= JspHelper.getPageBar(dispage,request.getRequestURL()+"?CMD=contentList")%>

		</td>
		<td class="tl05r" valign="top" memo="右边表格">
			<c:import url="/module/special/manageSpecial.do?CMD=listGlobalRight" />
		</td><!-- 右边表格所在格结束  -->
	</tr>
</table>
<table class="prodt04" cellspacing="0" cellpadding="0" align="center" memo="下方查询条">
<tr><td>
<form name="shopSearchBarForm" action="" method="post">
<input type="hidden" name="parentCat" />
<input class="input01" name="name" type="text" size="26" />
        <select name="searchType" class="input01">
					<option value="product">
						<bean:message key="company.81"/>
					</option>
					<option value="seller">
						<bean:message key="company.78"/>
					</option>
					<option value="buy">
						<bean:message key="company.79"/>
					</option>
					<option value="company">
						<bean:message key="company.94"/>
					</option>
				</select>
        <% 
            //构造 产品类别下拉菜单(一二两级)
    	    List maincatproduct = MemObjFactory.getDict("产品类别",sessionLocale.toString());
            boolean disableSelectParent = false; 
            out.println(JspHelper.getCatProductSelect(maincatproduct,"catproduct",disableSelectParent));
        %>
        
		<mytag:national name="country" dictName="<%=Constants.ALLCOUNTRY%>"/>
       <input type="button" onclick="search(document.shopSearchBarForm)" value="search" class="input01" /></td>
	</form>  
		</td>
	</tr>
</table>

      
      